package com.mew.chess.core.game.pokdeng.game.message;

import com.mew.chess.core.game.bjl.game.common.BjlConstantValue;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;

import java.util.List;

/**
 * @author dylin
 * @create 2021/5/7
 */
@Data
public class PushPaymentMessage extends ZebraBaseMessage<PushPaymentMessage> {
    private final int remainTime = BjlConstantValue.PAYMENT_TIME;

    private long bankerPayment;
    private List<PaymentMessage> payments;

    @Override
    public void write(ByteBuf b) {

        writeInt(b,remainTime);
        writeLong(b,bankerPayment);
        writeInt(b,payments.size());
        for (PaymentMessage payment : payments) {
            payment.write(b);
        }
    }

    @Override
    public PushPaymentMessage read(ByteBuf byteBuf) {
        return null;
    }
}
